package com.tanhua.manager.mapper;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.manager.domain.AnalysisByDay;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface SummaryMapper extends BaseMapper<AnalysisByDay> {

    @Select("SELECT SUM(num_registered) FROM tb_analysis_by_day")
    long cumulativeUsers();


    @Select("SELECT SUM(num_active) FROM tb_analysis_by_day WHERE record_date BETWEEN #{start} AND #{end}")
    long activePassMonth(@Param("start") DateTime date30, @Param("end") DateTime today);
}
